import React, {PureComponent } from 'react';
import './index.less';
import { Carousel, WingBlank, Icon, Button } from 'antd-mobile';
import connect from '@/connect.js'
const isIPhone = new RegExp('\\biPhone\\b|\\biPod\\b', 'i').test(window.navigator.userAgent);
let moneyKeyboardWrapProps;
if (isIPhone) {
    moneyKeyboardWrapProps = {
        onTouchStart: e => e.preventDefault()
    };
}
@connect
class dropDownForm extends PureComponent {
    constructor(props) {
        super(props);
        this.state = {
            dataPic: ['https://dss1.bdstatic.com/6OF1bjeh1BF3odCf/it/u=1238000549,973637751&fm=218&app=92&f=JPG?w=121&h=75&s=21D4EB22CED04DF76C0D2CE30300101E',
            'https://dss1.bdstatic.com/6OF1bjeh1BF3odCf/it/u=1238000549,973637751&fm=218&app=92&f=JPG?w=121&h=75&s=21D4EB22CED04DF76C0D2CE30300101E',
            'https://dss1.bdstatic.com/6OF1bjeh1BF3odCf/it/u=1238000549,973637751&fm=218&app=92&f=JPG?w=121&h=75&s=21D4EB22CED04DF76C0D2CE30300101E',
            'https://dss1.bdstatic.com/6OF1bjeh1BF3odCf/it/u=1238000549,973637751&fm=218&app=92&f=JPG?w=121&h=75&s=21D4EB22CED04DF76C0D2CE30300101E'],
            dataCode: [
                {
                    pic:'https://dss1.bdstatic.com/6OF1bjeh1BF3odCf/it/u=1238000549,973637751&fm=218&app=92&f=JPG?w=121&h=75&s=21D4EB22CED04DF76C0D2CE30300101E',
                    name: '居家小仙女',
                    nickname: '避雷针',
                    time: '2020-02-13',
                    scoreName: '单人粉色沙发椅子',
                    introduce: '尺寸正好合适家里的客厅和风格，材质是棉麻材质，就是只有抱枕可以拆洗，架子应该是铁架，质量很重，德邦送货上楼，坐感是偏硬一点点的，个人感觉正好',
                    browseLeft:'81',
                    browseUse: "16",
                    browseUseNo: '34',
                },
                {
                    pic:'https://dss1.bdstatic.com/6OF1bjeh1BF3odCf/it/u=1238000549,973637751&fm=218&app=92&f=JPG?w=121&h=75&s=21D4EB22CED04DF76C0D2CE30300101E',
                    name: '詹麟翾',
                    nickname: '避雷针',
                    time: '2020-02-13',
                    scoreName: '单人粉色沙发椅子',
                    introduce: '喜欢这个沙发很久了，款式非常大气，材质很好，之前沙发也是这个品牌，家人都很喜欢，朋友来家里也夸很好',
                    browseLeft:'81',
                    browseUse: "16",
                    browseUseNo: '34',
                },

            ]
          }    
        }
        componentDidMount() {
          }
    render() {
        return (
            <div className="productRating">
            <div className="product">
                <div className="product-number">
                <span className="product-numberCode">商品评分</span>
                <span className="product-numberPoint">3.7分</span>
                </div>
                <div className="product-more">
                <span>更多（167条）</span>
                <Icon size={'md'} color={'#999999'} type={'right'} />
                </div>
            </div>
            {
                this.state.dataCode.map((val, index) => {
                    return            <div>
                        {
                            index === 0 ? 
                            ''
                            :
                            <div className="dividing-line"></div>
                        }
                    <div className="picture">
                        <img className="picture-img" src={val.pic}></img>
                        <div className="picture-name">
                        <div className="picture-nickname">{val.name}</div>
                        <div className="nickname">{val.nickname}</div>
                        </div>
                        <span className="picture-time">{val.time}</span>
                    </div>
                    <div className="picture-score">
                        <span>这里是评分</span><span className="score-name">{val.scoreName}</span>
                    </div>
                    <div className="introduce">
                    {val.introduce}
                    </div>
                    <div className="pic-exhibition">
                        {
                            this.state.dataPic.map((val,index) => {
                                return <img style={{marginLeft: index === 0 ? '0px' : '9px'}} className="exhibition" src={val} />
                            })
                        }
                    </div>
                    <div className="browse">
                    <span className="browse-left">浏览{val.browseLeft || 0}次</span>
                    <span className="browse-right">
                        <span className="browse-use">有用（{val.browseUse}）</span>
                        <span>评论（{val.browseUseNo}）</span>
                    </span>
                    </div>
                    </div>
        
                })
            }
                  </div>
        );
    }
}
export default dropDownForm